package com.gzdict.myapplication.ui

import android.app.Application
import androidx.multidex.BuildConfig
import com.gzdict.common.Common
import com.gzdict.common.net.FastJsonConverter
import com.gzdict.common.net.HeaderInterceptor
import com.gzdict.common.utils.LogUtil
import com.gzdict.common.utils.SPKey
import com.gzdict.common.utils.TipUtils.showToast
import com.gzdict.common.utils.getStringSP

/**
 * 描述: app
 * @author: create by shang
 * date:2024/3/7 0007 16
 */
class App : Application() {

    override fun onCreate() {
        super.onCreate()

        Common.init(this,true)

        Common.initNet(
            "https://zyyfytest.gzdict.cn",
            FastJsonConverter("retCode", "retMessage", "result", "000000"),
            HeaderInterceptor()
        ) { errorMap ->
            LogUtil.e("errorMap $errorMap")
            showToast(errorMap["message"] as String)
        }
    }
}